import request from '@/utils/request'

// 获取企业管理列表
export const getQiyeListApi = (params) => {
    return request({
        url: '/companys',
        method: 'get',
        params,
    })
}

// 查询企业管理详情
export const getQiyeInfoApi = (id) => {
    return request({
        url: '/companys/' + id,
        method: 'get',
    })
}

// 添加企业管理
export const addQiyeApi = (data) => {
    return request({
        url: '/companys',
        method: 'post',
        data,
    })
}

// 修改企业管理
export const editQiyeApi = (data) => {
    return request({
        url: '/companys/' + data.id,
        method: 'put',
        data,
    })
}

// 删除企业管理
export const delQiyeInfoApi = (id) => {
    return request({
        url: '/companys/' + id,
        method: 'delete',
    })
}

// 设置企业管理状态
export const editQiyeStateApi = (data) => {
    return request({
        url: '/companys/' + data.id + '/' + data.state,
        method: 'post',

    })
}